package com.xinlu.common.exception;

import java.util.List;

import org.apache.log4j.Priority;

import com.xinlu.common.log.Logger;

public class LogicException extends CommonException {
	
	private static final Logger logger = Logger.getLogger(LogicException.class);

	/**
	 * Default construct function
	 * 
	 */
	public LogicException() {
		super();
	}

	/**
	 * @param string
	 * @param errorsList
	 */
	public LogicException(String errCode, List errorsList) {
		super(errCode, errorsList);
		setErrCode(errCode);

	}

	/**
	 * @param string
	 * @param strings
	 */
	public LogicException(String errCode, String[] args) {
		super(errCode, args);
		setErrCode(errCode);
	}

	/**
	 * @param string
	 * @param strings
	 */
	public LogicException(String errCode, String arg) {
		super(errCode, arg);
		setErrCode(errCode);
	}

	/**
	 * Constructor
	 * 
	 * @param errCode
	 * @param e
	 * @param args
	 *            param
	 */
	public LogicException(String errCode, Throwable e, String[] args) {
		super(errCode, e, args);
		setErrCode(errCode);

	}

	/**
	 * Constructor
	 * 
	 * @param errCode
	 * @param e
	 * @param args
	 *            param
	 */
	public LogicException(String errCode, Throwable e, String arg) {
		super(errCode, e, arg);
		setErrCode(errCode);

	}

	/**
	 * Constructor
	 * 
	 * @param errCode
	 */
	public LogicException(String errCode) {
		super(errCode);
		setErrCode(errCode); // Default error code
	}

	/**
	 * Constructor
	 * 
	 * @param errCode
	 * @param e
	 */
	public LogicException(String errCode, Throwable e) {
		super(errCode, e);
		setErrCode(errCode);
	}
	
	@Override
	public boolean getCurrentPageShow() {
		return true;
	}

	@Override
	public Priority getExceptionLevel() {
		return Priority.ERROR;
	}

}
